package com.oa.cc.dao;

import java.util.List;

import org.hibernate.criterion.Example;
import org.springframework.orm.hibernate3.support.HibernateDaoSupport;

import com.oa.domain.Workstream;

public class WorkStreamDaoImpl extends HibernateDaoSupport implements WorkStreamDao {
	public List<Workstream> getWordsByExample(Workstream workstream) {
		return getSession().createCriteria(Workstream.class).add(Example.create(workstream)).list();
	}

	public Workstream getWordStreamById(Long wsid) {
		return (Workstream) getSession().createQuery("from Workstream where wsid="+wsid).list().get(0);
	}

}
